<template>
  <h1></h1>
  <!--<el-row>-->
    <!--<el-col :span="12" align="left">-->
      <!--<img src="../../assets/logo.png" height="60"/>-->
    <!--</el-col>-->
    <!--<el-col :span="12" align="right">-->
      <!--<el-dropdown @command="handleCommand">-->
        <!--<span class="el-dropdown-link">-->
          <!--{{user.username}}<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
        <!--</span>-->
        <!--<el-dropdown-menu slot="dropdown">-->
          <!--<el-dropdown-item command="logout">退出</el-dropdown-item>-->
        <!--</el-dropdown-menu>-->
      <!--</el-dropdown>-->
    <!--</el-col>-->
  <!--</el-row>-->
</template>

<script>
import Vue from 'vue'
import {
  Row,
  Col,
  Dropdown,
  DropdownMenu,
  DropdownItem
} from 'element-ui'

Vue.use(Row)
Vue.use(Col)
Vue.use(Dropdown)
Vue.use(DropdownMenu)
Vue.use(DropdownItem)

export default {
  data () {
    return {}
  },
  methods: {
    handleCommand (command) {
      console.log(command)
      if (command === 'logout') {
        sessionStorage.removeItem('user')
        this.$router.push('/login')
      }
    }
  },
  computed: {
    user () {
      return JSON.parse(sessionStorage.getItem('user'))
    }
  }
}
</script>
